<template>
  <div id='chart1'>

  </div>
</template>

<script setup>
import {ref, onMounted} from "vue"
import * as echarts from 'echarts';

onMounted(() => {
  var chartDom = document.getElementById('chart1');
  var myChart = echarts.init(chartDom);
  var option;

  option = {
    series: [
      {
        type: 'treemap',
        data: [
          {
            name: 'nodeA',
            value: 10
          },
          {
            name: 'nodeB',
            value: 20
          }
        ]
      }
    ]
  };

  option && myChart.setOption(option);
})

</script>

<style scoped>
 #chart1 {
   width: 200px;
   height: 200px;
 }
</style>
